package com.naiterui.ehp.bs.recommend.bean;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;



@Table(name = "dr_common_prescription_detail")
@Entity
public class DrCommonPrescriptionDetail {

    /** 主键id */
    private Long id;

    /** 常用处方ID */
    private Long prescriptionId;

    /** 商品ID */
    private Long pid;

    /** skuId */
    private Long skuId;

    /** 商品名 */

    private String name;

    /** 通用名 */

    private String commonName;

    /** 商品数量 */
    private Integer quantity;

    /** 用法用量 */

    private String usages;

    /** 用量周期 */
    private Double dosageCycle;

    /** 用量周期单位 */

    private String dosageCycleUnit;

    /** 用量次数 */
    private String dosageCount;

    /** 每次用量 */
    private String eachDosageCount;

    /** 每次用量单位 */

    private String eachDoseUnit;

    /** 服用方法 */

    private String usageMethod;

    /** 使用时间 */

    private String usageTime;

    /** 用药周期 */
    private Double drugCycle;

    /** 用药周期单位 */

    private String drugCycleUnit;

    /** 推荐购买数量单位 */
    private String quantityUnit;

    /** 备注 */

    private String backup;

    /** 创建时间 */
    private Date createdAt;

    /** 修改时间 */
    private Date changedAt;

    /** 版本 */
    private Integer version;

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "prescription_id")
    public Long getPrescriptionId() {
        return prescriptionId;
    }

    public void setPrescriptionId(Long prescriptionId) {
        this.prescriptionId = prescriptionId;
    }

    @Column(name = "pid")
    public Long getPid() {
        return pid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }

    @Column(name = "sku_id")
    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }


    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName( String name) {
        this.name = name == null ? null : name.trim();
    }


    @Column(name = "common_name")
    public String getCommonName() {
        return commonName;
    }

    public void setCommonName( String commonName) {
        this.commonName = commonName == null ? null : commonName.trim();
    }

    @Column(name = "quantity")
    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }


    @Column(name = "usages")
    public String getUsages() {
        return usages;
    }

    public void setUsages( String usages) {
        this.usages = usages == null ? null : usages.trim();
    }


    @Column(name = "dosage_cycle_unit")
    public String getDosageCycleUnit() {
        return dosageCycleUnit;
    }

    public void setDosageCycleUnit( String dosageCycleUnit) {
        this.dosageCycleUnit = dosageCycleUnit == null ? null : dosageCycleUnit.trim();
    }

    @Column(name = "dosage_count")
    public String getDosageCount() {
        return dosageCount;
    }

    public void setDosageCount(String dosageCount) {
        this.dosageCount = dosageCount;
    }

    @Column(name = "each_dosage_count")
    public String getEachDosageCount() {
        return eachDosageCount;
    }

    public void setEachDosageCount(String eachDosageCount) {
        this.eachDosageCount = eachDosageCount;
    }


    @Column(name = "each_dose_unit")
    public String getEachDoseUnit() {
        return eachDoseUnit;
    }

    public void setEachDoseUnit( String eachDoseUnit) {
        this.eachDoseUnit = eachDoseUnit == null ? null : eachDoseUnit.trim();
    }


    @Column(name = "usage_method")
    public String getUsageMethod() {
        return usageMethod;
    }

    public void setUsageMethod( String usageMethod) {
        this.usageMethod = usageMethod == null ? null : usageMethod.trim();
    }


    @Column(name = "usage_time")
    public String getUsageTime() {
        return usageTime;
    }

    public void setUsageTime( String usageTime) {
        this.usageTime = usageTime == null ? null : usageTime.trim();
    }

    @Column(name = "drug_cycle")
    public Double getDrugCycle() {
        return drugCycle;
    }

    public void setDrugCycle(Double drugCycle) {
        this.drugCycle = drugCycle;
    }


    @Column(name = "drug_cycle_unit")
    public String getDrugCycleUnit() {
        return drugCycleUnit;
    }

    public void setDrugCycleUnit( String drugCycleUnit) {
        this.drugCycleUnit = drugCycleUnit == null ? null : drugCycleUnit.trim();
    }


    @Column(name = "backup")
    public String getBackup() {
        return backup;
    }

    public void setBackup( String backup) {
        this.backup = backup == null ? null : backup.trim();
    }

    @Column(name = "created_at")
    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    @Column(name = "changed_at")
    public Date getChangedAt() {
        return changedAt;
    }

    public void setChangedAt(Date changedAt) {
        this.changedAt = changedAt;
    }

    @Column(name = "dosage_cycle")
    public Double getDosageCycle() {
        return dosageCycle;
    }

    public void setDosageCycle(Double dosageCycle) {
        this.dosageCycle = dosageCycle;
    }

    @Column(name = "quantity_unit")
    public String getQuantityUnit() {
        return quantityUnit;
    }

    public void setQuantityUnit(String quantityUnit) {
        this.quantityUnit = quantityUnit;
    }

    @Version
    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }
}